﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SautinSoft;
namespace GT.Ultilities
{
	public class PDF
	{
		public static string Text(string path)
		{
			PdfFocus pdf = new PdfFocus();
			pdf.OpenPdf(path);
			StringBuilder sb = new StringBuilder();
			string text = null;
			for (int i = 1; i <= pdf.PageCount; i++)
			{
				text = pdf.ToText(i, i);
				text = text.Remove(0, text.IndexOf('!') + 1);
				sb.AppendLine(text);
			}
			return sb.ToString();
		}
	}
}
